import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:"/all"
  },
  {
    path:"/all",
    component:()=>import("../views/all"),
    children:[
      {
        path:"/all/home",
        component:()=>import("../views/home/home"),
        children:[
           {
             path:"/all/home/man",
             component:()=>import("../views/home/man")
           },
           {
            path:"/all/home/woman",
            component:()=>import("../views/home/women")
            },
            {
              path:"/all/home/hot",
              component:()=>import("../views/home/hot")
            },
            {
              path:"/all/home/underwear",
              component:()=>import("../views/home/Underwear")
            },
            {
              path:"/all/home",
              redirect:"/all/home/hot"
            }
        ]
      },
      {
        path:"/all",
        redirect:"/all/home"
      },
      {
         path:"/all/classfily",
         component:()=>import("../views/classifiy"),
         meta:{
             keepalive:true
        }
      }

    ],
 
  },

  {
    path: '/shopcar',
    component: () => import(/* webpackChunkName: "about" */ '../views/shopcar')
  },
  {
    path:"/detail",
    component:()=>import("../views/detail")
  },
  {
    path:"/my",
    component:()=>import("../views/my")
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
